<template>
    <div class="withdrawDetail">
        <van-nav-bar
                title="余额详情"
                left-arrow
                @click-left="$navBack('prePath')">
        </van-nav-bar>
        <div class="text-center-pk text-black-pk bg-white-pk font-size-14-pk remainHeader page-pad-pk">
            <div class="light-border-bottom-pk list-item-pad-pk">
                <div class="font-size-15-pk">{{logDetail.title}}</div>
                <div class="money" v-if="logDetail.money">
                    {{logFmt(logDetail.logType)}} {{logDetail.money}}
                </div>
                <div v-else class="money" >
                    {{logFmt(logDetail.logType)}}0
                </div>
            </div>
        </div>
        <div class="bg-white-pk page-pad-pk remainInfo">
            <div class="remainItem light-border-bottom-pk">
                <div class="text-light-pk">类型</div>
                <div class="itemRight">{{flagFmt(logDetail.flag)}}</div>
            </div>
            <div class="remainItem light-border-bottom-pk">
                <div class="text-light-pk">时间</div>
                <div class="itemRight">{{logDetail.createTime}}</div>
            </div>
            <div class="remainItem light-border-bottom-pk">
                <div class="text-light-pk">交易单号</div>
                <div class="itemRight">{{logDetail.withdrawalId}}</div>
            </div>
            <div class="remainItem light-border-bottom-pk">
                <div class="text-light-pk">剩余余额</div>
                <div class="itemRight">￥{{logDetail.realMoney}}</div>
            </div>
            <div class="remainItem ">
                <div class="text-light-pk">备注</div>
                <div class="itemRight"></div>
            </div>
        </div>

    </div>
</template>
<script>
    export default {
        name:"withdrawDetail",
        data(){
            return{
                logDetail:{},
                value:this.$route.params.queryStr
            }
        },

        created() {
            if(this.value) {
                this.logDetail = JSON.parse(decodeURI(this.value))
            }
        },
        methods:{
            //收入支付
            logFmt(logType){
             return logType == "0" ? "+" : "-"
            },
            flagFmt(flag){
                /*提现状态 0=待审核 1=审核通过 2=审核不通过 3=已发款 4=撤销申请*/
                let flagArr=[
                    {value: "0", name: "待审核"},
                    {value: "1", name: "审核通过"},
                    {value: "2", name: "审核不通过"},
                    {value: "3", name: "已发款"},
                    {value: "3", name: "撤销申请"},
                ];
                return this.$util.dictTranslate(flagArr,flag)
            }
        }
    }
</script>
<style lang="scss" scoped>
    .withdrawDetail{
        line-height: 2;
        .remainHeader{
            padding-top: 15px;
            .money{
                font-size: 24px;
            }
        }
        .remainInfo{
           /* padding-bottom: 10px;*/
            .remainItem{
                padding: 5px 0;
            }
            .itemLeft{
                color: #999999;
            }
            .itemRight{
                word-break: break-all;
                margin: -27px 0 0 90px;
            }
            .itemRight:empty::before {
                content: "-";
                color: #1A1A1A;
            }
        }
    }
</style>
